Optimal. Leaf size=229 \[ \frac {(1-2 m) m \sin (c+d x) \cos ^{m+1}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\cos ^2(c+d x)\right )}{3 a^2 d (m+1) \sqrt {\sin ^2(c+d x)}}-\frac {2 (1-m) (m+1) \sin (c+d x) \cos ^{m+2}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {m+2}{2};\frac {m+4}{2};\cos ^2(c+d x)\right )}{3 a^2 d (m+2) \sqrt {\sin ^2(c+d x)}}-\frac {2 (1-m) \sin (c+d x) \cos ^{m+1}(c+d x)}{3 a^2 d (\cos (c+d x)+1)}-\frac {\sin (c+d x) \cos ^{m+1}(c+d x)}{3 d (a \cos (c+d x)+a)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.30, antiderivative size = 229, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2766, 2978, 2748, 2643} \[ \frac {(1-2 m) m \sin (c+d x) \cos ^{m+1}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\cos ^2(c+d x)\right )}{3 a^2 d (m+1) \sqrt {\sin ^2(c+d x)}}-\frac {2 (1-m) (m+1) \sin (c+d x) \cos ^{m+2}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {m+2}{2};\frac {m+4}{2};\cos ^2(c+d x)\right )}{3 a^2 d (m+2) \sqrt {\sin ^2(c+d x)}}-\frac {2 (1-m) \sin (c+d x) \cos ^{m+1}(c+d x)}{3 a^2 d (\cos (c+d x)+1)}-\frac {\sin (c+d x) \cos ^{m+1}(c+d x)}{3 d (a \cos (c+d x)+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2643
Rule 2748
Rule 2766
Rule 2978
Rubi steps
\begin {align*} \int \frac {\cos ^m(c+d x)}{(a+a \cos (c+d x))^2} \, dx &=-\frac {\cos ^{1+m}(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {\int \frac {\cos ^m(c+d x) (a (2-m)+a m \cos (c+d x))}{a+a \cos (c+d x)} \, dx}{3 a^2}\\ &=-\frac {2 (1-m) \cos ^{1+m}(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {\cos ^{1+m}(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {\int \cos ^m(c+d x) \left (-a^2 (1-2 m) m+2 a^2 (1-m) (1+m) \cos (c+d x)\right ) \, dx}{3 a^4}\\ &=-\frac {2 (1-m) \cos ^{1+m}(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {\cos ^{1+m}(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}-\frac {((1-2 m) m) \int \cos ^m(c+d x) \, dx}{3 a^2}+\frac {(2 (1-m) (1+m)) \int \cos ^{1+m}(c+d x) \, dx}{3 a^2}\\ &=-\frac {2 (1-m) \cos ^{1+m}(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {\cos ^{1+m}(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {(1-2 m) m \cos ^{1+m}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\cos ^2(c+d x)\right ) \sin (c+d x)}{3 a^2 d (1+m) \sqrt {\sin ^2(c+d x)}}-\frac {2 (1-m) (1+m) \cos ^{2+m}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {2+m}{2};\frac {4+m}{2};\cos ^2(c+d x)\right ) \sin (c+d x)}{3 a^2 d (2+m) \sqrt {\sin ^2(c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 1.11, size = 0, normalized size = 0.00 \[ \int \frac {\cos ^m(c+d x)}{(a+a \cos (c+d x))^2} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.05, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\cos \left (d x + c\right )^{m}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a^{2} \cos \left (d x + c\right ) + a^{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.40, size = 0, normalized size = 0.00 \[ \int \frac {\cos ^{m}\left (d x +c \right )}{\left (a +a \cos \left (d x +c \right )\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \left (d x + c\right )^{m}}{{\left (a \cos \left (d x + c\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\cos \left (c+d\,x\right )}^m}{{\left (a+a\,\cos \left (c+d\,x\right )\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\cos ^{m}{\left (c + d x \right )}}{\cos ^{2}{\left (c + d x \right )} + 2 \cos {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________